package com.zt.chatgpt.domain.validate;

import com.zt.chatgpt.application.IWeiXinValidateService;
import com.zt.chatgpt.infrastructure.util.sdk.SignatureUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author: zt
 * @Description: 微信眼前实现类
 * @create: 2024-05-12 22:47
 */
@Service
public class WeiXinValidateServiceImpl implements IWeiXinValidateService {


    @Value("${wx.config.token}")
    private String token;


    @Override
    public boolean checkSign(String signature, String timestamp, String nonce) {
        return SignatureUtil.check(token, signature, timestamp, nonce);
    }
}
